#ifndef CONSTANTS_H
#define CONSTANTS_H

#include <QString>
#include <QMap>
#include <QStringList>

namespace XLL {

inline const QString DefaultURL = QStringLiteral("https://appstore.uniontech.com/store-dist-operaton/getNavInfo");

// 使用QMap存储键值对形式的headers
inline const QMap<QString, QString> DefaultHeadersMap = {
    {"platform", "Community"},
    {"arch", "amd64"},
    {"mode", "Desktop"},
    {"region", "CN"},
    {"language", "zh_CN"},
    {"baseline_main_version", "25"},
    {"baseline_version", "25"},
    {"motherboard", "B460M-HDV(RD)"},
    {"cpu_clip", "Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz"},
    {"client_version", "8.0.0.0000"},
    {"iswayland", "0"},
    {"supFeatures", "111111"}
};

// 如果需要字符串形式，可以提供一个转换函数
inline QString getHeadersString() {
    QStringList headers;
    for (auto it = DefaultHeadersMap.constBegin(); it != DefaultHeadersMap.constEnd(); ++it) {
        headers.append(it.key() + ": " + it.value());
    }
    return headers.join("\n");
}

}

#endif // CONSTANTS_H
